<?php if (!defined("_ECRIRE_INC_VERSION")) return;

function formulaires_ecatalogue_maintenance_traiter_dist(){
    $result = array();
    
	include_spip('functions/pdk_common');
	$ecatalogue = pdk_load_class('Ecatalogue','classes');
	
    if ($ecatalogue->PerformMaintenance($log))
        $result['message_ok'] = _T('ecatalogue:maintenance_ok');
    else
        $result['message_erreur'] = _T('ecatalogue:maintenance_error');
    
	$log_text = '';
	if ($log)
		foreach ($log as $log_item) {
			$log_text .= $log_item.'<br/>';
		}
    set_request('ecatalogue_maintenance_log', $log_text);
    
    return $result;
}

?>